/**
 * 
 */
package com.planner.core.action.node.form;

import com.planner.core.action.node.util.NodeDetailFormUtil;
import com.planner.core.vo.GraphNode;

/**
 * @author Sangharsh
 *
 */
public class NodeDetailForm extends AbstractNodeForm {
	private Long id = NodeDetailFormUtil.NOT_YET_CREATED_ID;
	private String name;
	private String code;
	private String description;
	private String displayOrder;
	
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}
	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}
	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}
	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	/**
	 * @return the displayOrder
	 */
	public String getDisplayOrder() {
		return displayOrder;
	}
	/**
	 * @param displayOrder the displayOrder to set
	 */
	public void setDisplayOrder(String displayOrder) {
		this.displayOrder = displayOrder;
	}
	public void setFormData(GraphNode node){
		//this.setId(node.getId());
		this.setName(node.getName());
		this.setCode(node.getCode());
		this.setDescription(node.getDescription());
	}
	
	/**
	 * Constructs a <code>String</code> with all attributes
	 * in name = value format.
	 *
	 * @return a <code>String</code> representation 
	 * of this object.
	 */
	public String toString()
	{
	    final String TAB = "    ";
	    
	    String retValue = "";
	    
	    retValue = "NodeDetailForm ( "
	        + super.toString() + TAB
	        + "id = " + this.id + TAB
	        + "name = " + this.name + TAB
	        + "code = " + this.code + TAB
	        + "description = " + this.description + TAB
	        + "displayOrder = " + this.displayOrder + TAB
	        + " )";
	
	    return retValue;
	}
	
}
